package com.learn.builder;

import com.learn.builder.base.Body;
import com.learn.builder.base.Foot;
import com.learn.builder.base.Hand;
import com.learn.builder.base.Head;
import com.learn.builder.innerClass.Man;
import com.learn.builder.normal.Director;
import com.learn.builder.normal.Human;
import com.learn.builder.normal.HumanBuilder;
import lombok.extern.slf4j.Slf4j;

/**
 * <p>项目名称: design-pattern </p>
 *
 * <p>文件名称: App </p>
 */
@Slf4j
public class App {

    public static void main(String[] args) {
        log.info("-----------------------------innerClass--------------------------------------");
        Man man = new Man.Builder()
                .buildHead(Head.MEDDLE_HEAD)
                .buildBody(Body.MEDDLE)
                .buildHand(Hand.NORMAL)
                .buildFoot(Foot.NORMAL)
                .createMan();
        log.info(man.toString());

        log.info("-----------------------------normal--------------------------------------");
        Director director = new Director();
        HumanBuilder hb = new HumanBuilder();
        Human beautifulHuman = director.createBeautifulHuman(hb);
        Human uglyHuman = director.createUglyHuman(hb);
        log.info(beautifulHuman.toString());
        log.info(uglyHuman.toString());
    }
}
